<%@ Page Language="C#" MasterPageFile="../Master/MasterPageAdm.master" AutoEventWireup="true"
    CodeFile="CadT_CATEGORIA.aspx.cs" Inherits="Cadastro_CadT_CATEGORIA" Title="UMEVOR - Categorias" %>

<asp:Content ID="cphPagina" ContentPlaceHolderID="cphPagina" runat="Server">

    <script language="javascript" type="text/javascript">
    
    function limparCampos()
    {
        
    }
    
    function validarSalvar()
    {
        return true;
    }
    
    function validarExcluir()
    {
        return true;
    }
    
    function EditarCategoria(categoria,codigo)
    {
        var txtCategoria = document.getElementById('ctl00_cphPagina_txtCategoria');
        var hidden = document.getElementById('ctl00_cphPagina_categoriaHiddenField');
        
        txtCategoria.value = categoria;
        hidden.value = codigo;
        txtCategoria.focus(); 
    }    
    </script>

    <table cellspacing="0" cellpadding="0" width="100%" border="0" align="left">
        <tr>
            <td colspan="2" class="titulo_miolo" style="padding-left: 8px; height: 20px; background-image: url(../images/bara_sobrecsn.jpg);
                width: 100%;" align="left">
                <b>Categorias</b>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="height: 25px; width: 100%;" align="left">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="left" colspan="2" style="padding-left: 30px; width: 758px; height: 51px">
                <!-- ESPAAMENTO LATERAL -->
                <table border="0" class="texto" style="height: 8px; text-align: left">
                    <tr>
                        <td align="left" style="height: 19px">
                            <b>*Categoria</b></td>
                    </tr>
                    <tr>
                        <td align="left" style="height: 20px">
                            <asp:TextBox ID="txtCategoria" runat="server" CssClass="texto" Width="282px" onblur="mascara(this,caracteresValidos)" MaxLength="60"></asp:TextBox>
                            <asp:HiddenField ID="categoriaHiddenField" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="height: 19px">
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="height: 19px">
                            <asp:ImageButton ID="btPesquisar" runat="server" ImageUrl="../images/bt_pesquisar.gif"
                                OnClick="btPesquisar_Click" />
                            <asp:ImageButton ID="btSalvar" runat="server" ImageUrl="../images/bt_gravar.gif" OnClick="btSalvar_Click" />
                            <asp:ImageButton ID="btExcluir" runat="server" ImageUrl="../images/bt_excluir.gif"
                                OnClick="btExcluir_Click" />
                            <asp:ImageButton ID="btLimpar" runat="server" ImageUrl="../images/bt_limpar.gif" OnClick="btLimpar_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="width: 571px; height: 19px">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="width: 571px; height: 19px">
                        </td>
                    </tr>
                    <tr align="center">
                        <td align="left" rowspan="2" style="width: 571px">
                            <asp:GridView ID="gvCategoria" runat="server" AllowPaging="True" AllowSorting="True"
                                AutoGenerateColumns="False" CssClass="texto" DataKeyNames="TX_DESC_CATEGORIA" PageSize="20" Width="100%" OnPageIndexChanging="gvCategoria_PageIndexChanging" OnRowCreated="gvCategoria_RowCreated">
                                <PagerSettings Mode="NumericFirstLast" />
                                <FooterStyle CssClass="texto" />
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkExclusao" runat="server" /></td>
                                        </ItemTemplate>
                                        <ItemStyle Width="20px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Categoria">
                                        <ItemStyle Width="250px" />
                                        <HeaderStyle Width="80px" />
                                        <ItemTemplate>
                                            <asp:LinkButton ID="nameLinkButton" runat="server" CausesValidation="false" CssClass="link_azul"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="ID_CATEGORIA" Visible="False" />
                                </Columns>
                                <RowStyle CssClass="grvItemStyle" />
                                <PagerStyle BackColor="#EA944B" CssClass="texto" ForeColor="White" HorizontalAlign="Center" />
                                <HeaderStyle BackColor="#EA944B" CssClass="texto" ForeColor="White" />
                                <AlternatingRowStyle CssClass="grvItemStyleAlternate" />
                            </asp:GridView>
                            &nbsp; &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
